#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.basic.module.menu.mapper;

import ${package}.common.bean.po.Menu;
import ${package}.common.bean.po.Role;
import ${package}.common.bean.vo.QueryBean;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Description: 无法补充
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Repository
public interface MenuMapper {

    /**
     * Description:
     * <分页查找>
     * @author wupanhua
     * @date 17:36 2019/8/6
     * @param queryBean 1
     * @return java.util.List<Menu>
     **/
    List<Menu> queryMenuListByLimit(QueryBean queryBean);

    /**
     * Description:
     * <插入菜单>
     * @author wupanhua
     * @date 17:36 2019/8/6
     * @param menu 1
     **/
    void insertMeun(Menu menu);

    /**
     * Description:
     * <获取所有菜单>
     * @author wupanhua
     * @date 17:36 2019/8/6
     * @return java.util.List<Menu>
     **/
    List<Menu> queryAllMenu();

    /**
     * Description:
     * <获取树形结构的菜单>
     * @author wupanhua
     * @date 17:37 2019/8/6
     * @return java.util.List<Menu>
     **/
    List<Menu> queryTreeMenu();

    /**
     * Description:
     * <根据菜单主键获取菜单>
     * @author wupanhua
     * @date 17:37 2019/8/6
     * @param menuKey 1
     * @return Menu
     **/
    Menu queryMenuByMenuKey(Long menuKey);

    /**
     * Description:
     * <根据parentid获取子菜单>
     * @author wupanhua
     * @date 17:39 2019/8/6
     * @param key 1
     * @return java.util.List<Menu>
     **/
    List<Menu> queryMenuByParentId(Long key);

    /**
     * Description:
     * <根据角色主键获取权限下的菜单>
     * @author wupanhua
     * @date 17:39 2019/8/6
     * @param roles 1
     * @return java.util.List<Menu>
     **/
    List<Menu> queryPermissionMenuByRoleKey(List<Role> roles);

    /**
     * Description:
     * <根据parentid查询数据>
     * @author pig
     * @date 17:39 2019/8/6
     * @param id 1
     * @return int
     **/
    int queryMenuCountByParentid(Long id);

    /**
     * Description:
     * <根据id修改菜单状态为删除>
     * @author pig
     * @date 17:39 2019/8/6
     * @param id 1
     **/
    void updateMenuStatusDeleteById(Long id);

    /**
     * Description:
     * <禁用/启用菜单>
     * @author pig
     * @date 17:39 2019/8/6
     * @param menu 1
     **/
    void updateMenuStatus(Menu menu);

    /**
     * Description:
     * <根据id查询菜单信息>
     * @author pig
     * @date 17:40 2019/8/6
     * @param id 1
     * @return Menu
     **/
    Menu queryMenuById(Long id);

    /**
     * Description:
     * <根据id更新菜单信息>
     * @author pig
     * @date 17:40 2019/8/6
     * @param menu 1
     **/
    void updateMenuById(Menu menu);

    /**
     * Description:
     * <查询所有叶子节点>
     * @author pig
     * @date 17:40 2019/8/6
     * @return java.util.List<Menu>
     **/
    List<Menu> queryAllChildren();

    /**
     * Description:
     * <根据主键批量查询是否有子菜单>
     * @author pig
     * @date 17:41 2019/8/6
     * @param keys 1
     * @return java.util.List<Menu>
     **/
    List<Menu> findSubMenuByKeys(List<Long> keys);


    /**
     * Description:
     * <批量将菜单状态置为删除>
     * @author pig
     * @date 17:41 2019/8/6
     * @param frees 1
     **/
    void updateMenuStatusDeleteByKeys(List<Long> frees);

    /**
     * Description:
     * <根据id批量查询菜单信息>
     * @author pig
     * @date 17:41 2019/8/6
     * @param occupied 1
     * @return java.util.List<Menu>
     **/
    List<Menu> findMenusByKeys(List<Long> occupied);

    /**
     * Description:
     * <根据name查询菜单>
     * @author pig
     * @date 17:42 2019/8/6
     * @param name 1
     * @return java.util.List<Menu>
     **/
    List<Menu> findMenuByNaem(String name);

    /**
     * Description:
     * <根据url查询菜单>
     * @author pig
     * @date 17:42 2019/8/6
     * @param url 1
     * @return Menu
     **/
    Menu findMenuByUrl(String url);

    /**
     * Description:
     * <根据order查询菜单>
     * @author pig
     * @date 17:42 2019/8/6
     * @param orderd 1
     * @return Menu
     **/
    Menu findMenuByOrderd(String orderd);

    /**
     * Description:
     * <根据名称查询菜单时筛除传来的id数据>
     * @author pig
     * @date 17:43 2019/8/6
     * @param menu 1
     * @return java.util.List<Menu>
     **/
    List<Menu> findMenuByNaemOrNotInId(Menu menu);

    /**
     * Description:
     * <根据url查询菜单 筛除传来id的数据>
     * @author  pig
     * @date 17:43 2019/8/6
     * @param menu 1
     * @return java.util.List<Menu>
     **/
    List<Menu> findMenuByUrlOrNotInId(Menu menu);
}
